Conversation
|
I just tested this and it works. Do you think we should make |
|
At the moment there are actually only two cases:
For the binary mode, directly searching the path should be able to replace all other logic; for js modules, searching the path should also work in theory. However, keeping |
|
Hey @tiann! Thanks for this PR - the PATH fallback is a great addition. I've merged your improvements into my bun-support branch (PR #91):
I extended it with:
I'd be happy (ahem... pun intended :-) ) to coordinate so we can get both our contributions merged! Happy to adjust anything on my side too. |
|
+1 on PATH-first priority @Enzime! I've implemented this in PR #91 - user preferences should be respected. My detection order is:
Env var first for explicit control, then PATH respects user's shell config. |
Merges feature/bun-support-claude-cli-detection branch with: - Bun runtime detection and CLI discovery - HAPPY_CLAUDE_PATH env var override - PATH fallback from tiann's PR slopus#83 (stdio suppression, existence check) - Source detection (npm, Bun, Homebrew, native installer) Detection priority: HAPPY_CLAUDE_PATH > PATH > npm > Bun > Homebrew > native Also fixes test issues: - apiSession.test.ts: vi.hoisted pattern for mock hoisting - claudeLocal.test.ts: check spawn args instead of array mutation - runtime.test.ts: ESM imports instead of require() Credit: @tiann (slopus#83)
|
I've now got a version with a large range of fixes merged at #107 and I've had a zoom conversation with @bra1nDump about it. Fixes to the issues mentioned here are included. |
Incorporates tiann's improvements from slopus/happy-cli#83: - stdio suppression for cleaner which/where execution - Existence check before symlink resolution (safer) - Fallback to original path if resolution fails Combined with our branch's additions: - Source detection (npm, Bun, Homebrew, etc.) - PATH-first priority per @Enzime's suggestion Detection priority: PATH > npm > Bun > Homebrew > native Credit: @tiann (slopus/happy-cli#83)
Merges feature/bun-support-claude-cli-detection branch with: - Bun runtime detection and CLI discovery - HAPPY_CLAUDE_PATH env var override - PATH fallback from tiann's PR #83 (stdio suppression, existence check) - Source detection (npm, Bun, Homebrew, native installer) Detection priority: HAPPY_CLAUDE_PATH > PATH > npm > Bun > Homebrew > native Also fixes test issues: - apiSession.test.ts: vi.hoisted pattern for mock hoisting - claudeLocal.test.ts: check spawn args instead of array mutation - runtime.test.ts: ESM imports instead of require() Credit: @tiann (slopus/happy-cli#83)
Incorporates tiann's improvements from slopus/happy-cli#83: - stdio suppression for cleaner which/where execution - Existence check before symlink resolution (safer) - Fallback to original path if resolution fails Combined with our branch's additions: - Source detection (npm, Bun, Homebrew, etc.) - PATH-first priority per @Enzime's suggestion Detection priority: PATH > npm > Bun > Homebrew > native Credit: @tiann (slopus/happy-cli#83)
Merges feature/bun-support-claude-cli-detection branch with: - Bun runtime detection and CLI discovery - HAPPY_CLAUDE_PATH env var override - PATH fallback from tiann's PR #83 (stdio suppression, existence check) - Source detection (npm, Bun, Homebrew, native installer) Detection priority: HAPPY_CLAUDE_PATH > PATH > npm > Bun > Homebrew > native Also fixes test issues: - apiSession.test.ts: vi.hoisted pattern for mock hoisting - claudeLocal.test.ts: check spawn args instead of array mutation - runtime.test.ts: ESM imports instead of require() Credit: @tiann (slopus/happy-cli#83)
Incorporates tiann's improvements from slopus/happy-cli#83: - stdio suppression for cleaner which/where execution - Existence check before symlink resolution (safer) - Fallback to original path if resolution fails Combined with our branch's additions: - Source detection (npm, Bun, Homebrew, etc.) - PATH-first priority per @Enzime's suggestion Detection priority: PATH > npm > Bun > Homebrew > native Credit: @tiann (slopus/happy-cli#83)
Merges feature/bun-support-claude-cli-detection branch with: - Bun runtime detection and CLI discovery - HAPPY_CLAUDE_PATH env var override - PATH fallback from tiann's PR slopus#83 (stdio suppression, existence check) - Source detection (npm, Bun, Homebrew, native installer) Detection priority: HAPPY_CLAUDE_PATH > PATH > npm > Bun > Homebrew > native Also fixes test issues: - apiSession.test.ts: vi.hoisted pattern for mock hoisting - claudeLocal.test.ts: check spawn args instead of array mutation - runtime.test.ts: ESM imports instead of require() Credit: @tiann (slopus/happy-cli#83)
No description provided.